Skip to content

speaker tuning: collect the BuzzKill matrix only on request until speakerguardd reads it - #168

Merged
DjDeveloperr merged 1 commit into
mainfrom
djdev/buzzkill-reader-gate
Nov 20, 2026
Merged

DjDeveloperr merged 1 commit into
mainfrom
djdev/buzzkill-reader-gate

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Since #119 (merged 2026-11-13) the Python collector writes a buzzkill_quadrature record and buzzkill-quadrature.bin into every bundle whose AudioDSP has the matrix, which is every macOS build seen so far. speakerguardd v2 parses a schema-2 manifest with deny_unknown_fields, and no release reads that record yet (speakerguardd#138, still a draft, adds the reader). So every speakerguardd-v2 release up to 1.0.0alpha.1-42 refuses such a bundle:

manifest.json: not a schema-2 manifest: unknown field `buzzkill_quadrature`

What users see:

  • aurora-speaker-upgrade --collection refuses the switch. The legacy protection keeps the speakers.
  • On a kernel with only the v2 interface, a bundle installed with install-linux.sh stops speakerguardd-provision, and the speakers stay at the kernel's floor (silent).

It has been seen on a J713 (AID37, reported on speakerguardd#138) and on an M4 Mac mini (J773g, AID36). Macs with short lsm2 presets have to take this route for the lsm2 fill, so they can't get v2 at all today. The native installer (Alpha 20 to 22) doesn't collect the matrix, so the bundles it installs are not affected.

#138 planned this merge order: speakerguardd#136, then speakerguardd#138, then this repo's #119. This PR restores that order on the collector side and keeps the data path:

  • asahi_firmware/audio_tuning.py: the matrix is collected only on request, through AudioTuningFWCollection(buzzkill=True) (default COLLECT_BUZZKILL = False). That matches the native installer. update() still verifies and reads a bundle that already carries the matrix. without_buzzkill() returns exactly the bundle the collector writes without the matrix.
  • tools/speaker-tuning: collect and collect-linux take --buzzkill-matrix for rigs. install installs a bundle that carries the matrix without it, and says so. --keep-buzzkill-matrix keeps it.
  • Once a speakerguardd release reads the record, flip COLLECT_BUZZKILL.

speakerguardd gets a companion PR so that collections already made since 11-13 are accepted by aurora-speaker-upgrade. That PR touches no file the voicing law hashes.

Tests, all synthetic: python3 -m unittest discover -s tests passes, 193 tests (189 before). The new tests cover:

  • by default nothing is collected, and the matrix is not even read;
  • without_buzzkill(collected with) equals the bundle collected without the matrix;
  • install drops the matrix by default, then reports "identical" on a second run;
  • install --keep-buzzkill-matrix keeps it.

🤖 Generated with Claude Code

…akerguardd reads it

Since #119 the Python collector adds a `buzzkill_quadrature` record (and
buzzkill-quadrature.bin) to every bundle whose AudioDSP holds the matrix,
which is every macOS build seen so far. speakerguardd v2 parses a schema-2
manifest with deny_unknown_fields and no release reads the record yet
(speakerguardd#138 adds the reader), so every release up to
1.0.0alpha.1-42 refuses such a bundle: "not a schema-2 manifest: unknown
field `buzzkill_quadrature`". aurora-speaker-upgrade --collection then
refuses the switch, and a Mac whose kernel has only the v2 interface,
given the bundle with install-linux.sh, keeps its speakers at the kernel's
floor. Seen on a J713 (AID37) and an M4 Mac mini (J773g, AID36). The
native installer does not collect the matrix, so its bundles are not
affected.

Collect the matrix only when asked (collect/collect-linux
--buzzkill-matrix, AudioTuningFWCollection(buzzkill=True)), as the native
installer does, until a speakerguardd release reads it; then flip
COLLECT_BUZZKILL. A bundle that already carries it is still verified and
read. install-linux.sh installs such a bundle without the matrix by default
(without_buzzkill: the bundle exactly as collected without it) and says
so; --keep-buzzkill-matrix keeps it.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

End to end on an M4 Mac mini (J773g), 2026-11-19.

Fresh collections made on the Mac's own macOS (26B123 tunings, AID36):

Each was run on Linux through aurora-speaker-upgrade collect --route 3 and aurora-speaker-tuning compile, with speakerguardd-v2 at the RC9 pin plus #212 and the upgrade tool from 0.1-0.15:

upgrade tool collector result
stock 0.15 main refused: unknown field buzzkill_quadrature
stock 0.15 #168 compiles, blob 18a6a5717fd54851
aurora-silicon/speakerguardd#213 main record dropped (said so), compiles, blob 18a6a5717fd54851
aurora-silicon/speakerguardd#213 #168 compiles, blob 18a6a5717fd54851

18a6a571… is byte for byte the blob of the bundle this Mac's v2 has played protected audio on since this morning.

The same Mac also reproduced the field case through route 0. Its ESP bundle, installed this morning with install-linux.sh from a current collection, makes the stock aurora-speaker-upgrade --check stop at unknown field buzzkill_quadrature. With #213, the same bundle passes acquire and compile.

#168's install-linux.sh --dry-run with the main tarball says "installed without it". On this ESP its superset check then stops the rebuild, because vendorfw holds apple/bluetooth-taurus-calibration-bf.bin from aurora-installer#154, which main does not extract yet. That stop is unrelated to this change, and nothing was written.

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

The "Conformance matrix" failure in run 44559038093 isn't a test result. The step stopped with TimeoutError: The read operation timed out in conformance.py fetch(), while range-reading a remote release payload over HTTPS (esp_archive → extract → urlopen).

I've re-run the failed job (attempt 2).

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Independent review (pre-merge): head 9840aade

Verdict: ready to merge.

🤖 Generated with Claude Code

@DjDeveloperr
DjDeveloperr merged commit 50b7fbe into main Nov 20, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant